package com.qf.loanrepayment;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qf.borrower.Borrower;
import com.qf.loanapplication.Loanapplication;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * @author H
 * @create 2020-11-03 15:07
 * @strive To be whoever you want to be.
 * @Description: 贷款还款表 loanrepayment
 * <p>
 * <p>
 * id，贷款申请表id（外键），操作员id（外键）
 * <p>
 * 还款时间，还款方式，应还款金额，应还款利息，应还款总额，未还款金额，还款状态（未还款-已还款），还款操作员
 * <p>
 * id,loanapplicationId,operatorId
 * <p>
 * repaymentTime,paymentMode,payableAmount,payableInterest,payableAmountTotal,outstandingAmount,paymentStatus,
 */

@Entity
@Data
@Table(name = "loanrepayment")
public class Loanrepayment {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name = "loanapplication_id")
    private Integer loanapplicationId;



    @Column(name = "repayment_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date repaymentTime;


    @Column(name = "payment_mode")
    private String paymentMode;
    @Column(name = "payable_amount")
    private Double payableAmount;
    @Column(name = "payable_interest")
    private Double payableInterest;
    @Column(name = "payable_amount_total")
    private Double payableAmountTotal;
    @Column(name = "outstanding_amount")
    private Double outstandingAmount;
    @Column(name="payment_status")
    private String paymentStatus;

    private String attribute1;
    private Integer attribute2;

}
